<?php
include '../conn.php';
include "s-cookie.php";
?>
<!DOCTYPE html>
<html lang="zh">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>成绩考核表-学生端</title>
    <link rel="stylesheet" type="text/css" href="../css/htmleaf-demo.css">
    <link rel="stylesheet" type="text/css" href="../css/nav.css">
    <link rel="stylesheet" type="text/css" href="../fonts/iconfont.css">

    <link rel="stylesheet" href="../css/bootstrap-theme.css"/>

    <script type="text/javascript" src="../js/jquery.min.js"></script>
    <link rel="stylesheet" href="../css/bootstrap-theme.min.css"/>
    <link rel="stylesheet" href="../css/bootstrap.css"/>
    <script type="text/javascript" src="../js/bootstrap3.0.3.min.js"></script>
    <link rel="stylesheet" type="text/css" href="../css/style.css">

    <style>


    </style>

</head>

<body class="bodycolor">

<nav class="navbar navbar-default navbar-fixed-top" style="clear: left;">
    <div class="container">
        <div class="navbar-right navfont" id="navbar-collapse">
            <p>华软网络技术系毕业管理系统</p>
        </div>
        <a href="s-cookie.php?cookie=out" id="out">退出</a>
    </div>

</nav>

<div class="nav topx navbackground-s" id="nav">
    <div>

        <div style="border-bottom:1px solid rgba(255,255,255,.1)"><img src="../images/mini.png"></div>
    </div>
    <ul>
        <li class="nav-item">
            <a href="s-index.php"><i class="my-icon nav-icon icon_2"></i><span>首页</span><i class="my-icon nav-more"></i></a>

        </li>
        <li class="nav-item">
            <a href="s-mykt.php"><i class="my-icon nav-icon icon_1"></i><span>我的课题</span><i
                    class="my-icon nav-more"></i></a>
        </li>

        <li class="nav-item">
            <a href="s-examination.php"><i class="my-icon nav-icon icon_3"></i><span>成绩考核表</span><i
                    class="my-icon nav-more"></i></a>

        </li>
        <li class="nav-item">
            <a href="s-information.php"><i class="my-icon nav-icon icon_4"></i><span>我的资料</span><i
                    class="my-icon nav-more"></i></a>
        </li>
        <li class="nav-item">
            <a href="teachresearch.php"><i class="my-icon nav-icon icon_6"></i><span>选课</span><i
                    class="my-icon nav-more"></i></a>
        </li>
    </ul>
</div>

<div class="indexborder">

    <center>

        <div width="100%">

            <div class="box-inline indexdiv1 panel panel-default auto" align="center">

                <div class="panel panel-default panel-primary ">

                    <div class="panel-heading">
                        <h3 class="panel-title">成绩考核表</h3>

                    </div>
                    <div class="panel-body ex">

                        <table class="table table-striped table-condensed ">
                            <caption>指导教师评分</caption>
                            <thead>
                            <tr class="thcolor">
                                <th>序号</th>
                                <th>考核项目</th>
                                <th>满分</th>
                                <th>得分</th>
                                <th>评语</th>

                            </tr>



                            <?php

                            $sql = "SELECT g.Order1,g.Order2,g.Order3,g.Order4,g.Order5,g.remark
                                        from guidemark as g
                                        join project as p on g.Project_ProjectId = p.ProjectId
                                       JOIN student AS s ON p.Student_StudentId = s.StudentId
                                      where s.StudentId=" . $_SESSION["s-id"] . " and p.Year=" . $_SESSION["s-Year"];


                            $result = mysqli_query($conn, $sql);
                            $row = mysqli_fetch_array($result);
                            ?>
                            </thead>
                            <tr>
                                <td>1</td>
                                <td>工作态度与纪律</td>
                                <td>10</td>
                                <td id="sorecolor"><?= $row[0] ?> </td>
                                <td rowspan="5"><?= $row[5] ?></td>
                            </tr>
                            <tr>
                                <td>2</td>
                                <td>基本理论、专业知识、基本技能和外语水平</td>
                                <td>10</td>
                                <td id="sorecolor"><?= $row[1] ?></td>

                            </tr>
                            <tr>
                                <td>3</td>
                                <td>完成任务情况与水平（工作量及完成质量）</td>
                                <td>20</td>
                                <td id="sorecolor"><?= $row[2] ?></td>

                            </tr>
                            <tr>
                                <td>4</td>
                                <td>独立工作能力、分析解决问题和实际工作能力</td>
                                <td>15</td>
                                <td id="sorecolor"><?= $row[3] ?></td>

                            </tr>
                            <tr>
                                <td>5</td>
                                <td>创新能力</td>
                                <td>5</td>
                                <td id="sorecolor"><?= $row[4] ?></td>

                            </tr>
                        </table>

                        <table class="table table-striped table-condensed ">
                            <caption>评阅教师评分</caption>
                            <thead>
                            <tr class="thcolor">
                                <th class="th1">序号</th>
                                <th class="th4">考核项目</th>
                                <th class="sore">满分</th>
                                <th class="sore">得分</th>
                                <th class="sore">评语</th>
                            </tr>
                            </thead>
                            <?php
                            $sql1 = "SELECT th.Order6,th.Order7,th.remark
															FROM thesismark AS th
															JOIN project AS p ON th.Project_ProjectId = p.ProjectId
															JOIN teacher AS t ON p.Teacher_TeacherId = t.TeacherId
															JOIN student AS s ON p.Student_StudentId = s.StudentId
															where s.StudentId=" . $_SESSION["s-id"] . " and p.Year=" . $_SESSION["s-Year"];

                            $result = mysqli_query($conn, $sql1);
                            $row = mysqli_fetch_array($result);
                            ?>
                            <tr>
                                <td>6</td>
                                <td>质量（正确性、条理性、创造性和实用性）</td>
                                <td>12</td>
                                <td id="sorecolor"><?= $row[0] ?></td>
                                <td rowspan="2"><?= $row[2] ?></td>
                            </tr>
                            <tr>
                                <td>7</td>
                                <td>成果的技术水平（理论、分析、计算、实验和实物性能）</td>
                                <td>8</td>
                                <td id="sorecolor"><?= $row[1] ?></td>

                            </tr>
                        </table>

                        <table class="table table-striped table-condensed ">
                            <caption>答辩组教师评分</caption>
                            <thead>
                            <tr class="thcolor">
                                <th class="width:5%">序号</th>
                                <th class="th2">考核项目</th>
                                <th class="">满分</th>
                                <th>得分</th>
                                <th class="mark1">评语</th>
                            </tr>
                            </thead>
                            <?php
                            $sql3 = "SELECT s.StudentId, r.Project_ProjectId, d.Order8,d.Order9,d.Order10,d.Order11,d.remark
FROM replymark AS r
JOIN project AS p ON r.Project_ProjectId = p.ProjectId
JOIN student AS s ON p.Student_StudentId = s.StudentId
JOIN dzsubject as d on p.ProjectId = d.Project_ProjectId
GROUP BY r.Project_ProjectId
HAVING s.StudentId =" . $_SESSION["s-id"];
                            $result = mysqli_query($conn, $sql3);
                            $row = mysqli_fetch_array($result);
                            ?>
                            <tr>
                                <td>8</td>
                                <td>完成任务情况与水平</td>
                                <td>5</td>
                                <td id="sorecolor"><?= $row[2] ?></td>
                                <td rowspan="5"><?= $row[6] ?></td>
                            </tr>
                            <tr>
                                <td>9</td>
                                <td>论文、设计任务书、图纸与实物的质量</td>
                                <td>5</td>
                                <td id="sorecolor"><?= $row[3] ?></td>

                            </tr>
                            <tr>
                                <td>10</td>
                                <td>答辩时讲述的系统性及语言表达能力</td>
                                <td>5</td>
                                <td id="sorecolor"><?= $row[4] ?></td>

                            </tr>
                            <tr>
                                <td>11</td>
                                <td>回答问题的正确性</td>
                                <td>5</td>
                                <td id="sorecolor"><?= $row[5] ?></td>

                            </tr>
                        </table>
                    </div>
                </div>

            </div>

        </div>
</div>

<!--<footer class="indexfooter container-fluid  bottom">-->
<!--    <p class="footer-p" align="center">地址：广东省广州市从化区经济开发区高技术产业园广从南路548号 | 电话：020－87818918 邮编：510990 | 网站公安备案编号：4401840100050 粤ICP备：05085382号 站长统计</p>-->
<!--</footer>-->


<script>
    window.jQuery || document.write('<script src="../js/jquery-1.11.0.min.js"><\/script>')
</script>
<script type="text/javascript" src="../js/nav.js"></script>

</body>

</html>